#include "cgloble.h"

CGloble::CGloble():CSingleton<CGloble>()
{

}

void CGloble::popQue(pair<SUdpDataHead,SUdpData>& item)
{
    m_mutexQue.Lock();
    pair<SUdpDataHead,SUdpData> tmp;
    tmp = m_queWriteUdpData.front();
    item.first = tmp.first;
    item.second = tmp.second;
    m_queWriteUdpData.pop();
    m_mutexQue.Unlock();
  //  cout << "popQue(); m_queWriteMat_size" << m_queWriteMat.size() << endl;
}

bool CGloble::pushQue(SUdpDataHead udp_head, SUdpData mat)
{
    m_mutexQue.Lock();
    m_pairWrite.first = udp_head;
    m_pairWrite.second = mat;

    m_queWriteUdpData.push(m_pairWrite);
    m_mutexQue.Unlock();
   // cout << "pushQue(); m_queWriteMat_size" << m_queWriteMat.size() << endl;
    return true;
}

